#include "common/basictypes.h"
#include "i386/system/string.h"

uint8 *memcpy16(uint8 *dest, const uint8 *src, int32 count) {
  int32 i;
  for (i=0; i<count;i++) {
    dest[i]=src[i];
  }
  
  return dest;
}

uint8 *memset16(uint8 *dest, uint8 val, int32 count) {
  int32 i;
  for (i=0; i<count;i++) {
    dest[i]=val;
  }
  
  return dest;
}

uint16 *memsetw16(uint16 *dest, uint16 val, int32 count) {
  int32 i;
  for (i=0; i<count;i++) {
    dest[i]=val;
  }
  
  return dest;
}

int32 strlen16(const char *str) {
  int32 i;
  for (i=0;;i++) {
    if (str[i] == '\0')
      return i;
  }
}
